#!/usr/bin/env node

const pi = Math.PI;

module.exports = function (radius) {
  //计算周长
  function circumference() {
    return pi * 2 * radius;
  }

  //计算面积
  function area() {
    return pi * radius * radius;
  }
  return {
    area: area,
    circumference: circumference
  };
}

console.log('\n02-exports-function:\n', module);